package com.gieee.ywj.of.controller;


import com.gieee.ywj.of.feign.UserFeign;
import com.gieee.ywj.of.rest.client.SayingRestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SayController {

    @Autowired
    private UserFeign userFeign;

    @Autowired
    private SayingRestService sayingRestService;

    @GetMapping("/of/say")
    public String say(@RequestParam("msg")String msg){
        String s = userFeign.sayHi(msg);
        return s;
    }


    @GetMapping("/of/say2")
    public String say2(@RequestParam("msg")String msg){
        String s = sayingRestService.sayHi(msg);
        return s;
    }

}
